﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companyRule.aspx.cs" Inherits="WebSite.admin.company.CompanyRule" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
    <title>福利点点通 </title>
      <link href="../css/skin.css" rel="stylesheet" type="text/css" />
      <script src="../js/common.js" type="text/javascript"></script>
       <script type="text/javascript">

           function alertSelectedValue() {

               var list2 = Ext.getCmp('SimpleForm1_cblCardManager');
               var selectedCheckboxs = list2.getValue(), selectedValues, i;
              var sHdList = document.getElementById("hdValues");
            if (selectedCheckboxs.length) {
                selectedValues = [];
                for (i = 0; i < selectedCheckboxs.length; i++) { 
                   sHdList.value = sHdList.value + selectedCheckboxs[i].getRawValue() + ",";
                }
           }


           var list3 = Ext.getCmp('SimpleForm1_cblReporStat');
           var selectedCheckboxs3 = list3.getValue(), selectedValues3, i3;

           if (selectedCheckboxs3.length) {
               selectedValues = [];
               for (i3 = 0; i3 < selectedCheckboxs3.length; i3++) {
                   sHdList.value = sHdList.value + selectedCheckboxs3[i3].getRawValue() + ",";
               }
           }

           var list4 = Ext.getCmp('SimpleForm1_cblCompanyManger');
           var selectedCheckboxs4 = list4.getValue(), selectedValues4, i4;
           if (selectedCheckboxs4.length) {
               selectedValues4 = [];
               for (i4 = 0; i4 < selectedCheckboxs4.length; i4++) {
                   sHdList.value = sHdList.value + selectedCheckboxs4[i4].getRawValue() + ",";
               }
           }
           var list5 = Ext.getCmp( 'SimpleForm1_cblGoodsManager' );
           var selectedCheckboxs5 = list5.getValue(), selectedValues5, i5;
           if ( selectedCheckboxs5.length ) {
               selectedValues5 = [];
               for ( i5 = 0; i5 < selectedCheckboxs5.length; i5++ ) {
                   sHdList.value = sHdList.value + selectedCheckboxs5[i5].getRawValue() + ",";
               }
           }

          // alert(sHdList.value);
         
        }

    
    </script>
   
</head>
<body>
    <form id="form2" runat="server">
    
      <ext:PageManager ID="PageManager1" runat="server" />  


       <ext:SimpleForm ID="SimpleForm1" runat="server" LabelWidth="100px"
           EnableBackgroundColor="true" BodyPadding="5px" ShowBorder="false" ShowHeader="True"
          Title="简单表单">
        <Items>
         
          
                 <ext:CheckBoxList ID="cblCardManager" ColumnNumber="2" runat="server" Label="卡片管理"></ext:CheckBoxList> 
                      <ext:CheckBoxList ID="cblReporStat" ColumnNumber="2" runat="server" Label="报表统计"></ext:CheckBoxList>  
                     <ext:CheckBoxList ID="cblCompanyManger" ColumnNumber="2" runat="server" Label="公司管理"></ext:CheckBoxList>  

                 <ext:CheckBoxList ID="cblGoodsManager" ColumnNumber="2" runat="server" Label="商品管理"></ext:CheckBoxList> 
              
                  <ext:button ID="btnSave" runat="server" Text="保 存" ValidateForms="extForm1"   OnClientClick="alertSelectedValue()"  
                        Type="Submit" OnClick="btnSave_Click"  >  
                       </ext:button>

              </Items>
              </ext:SimpleForm>
              <asp:HiddenField ID="hdValues" runat="server" />

    </form>
</body>
</html>


